<html>
<head><title>xmlrpc</title></head>
<body>
<?php
	include_once '../Utility/DebugLogs.php';
	$logfile = fopen($_SERVER['DOCUMENT_ROOT']."/rmob/iPhone-Server/Log/mycachelog.txt",'a');
	logthis("LOGGA!!!!");
#	$auth_req = new xmlrpcmsg('autenticazione.Accedi',   array(new xmlrpcval("rmob-vu8l53X71qnUqOF", "string"), new xmlrpcval("", "string")));
#	$client_req= new xmlrpc_client("http://muovi.roma.it/ws/xml/autenticazione/1");
#	$client_req->setDebug(1);
#	$r=$client_req->send($auth_req);
#	if(!$r->faultCode())
#	{
#       	$token_id = $r->value();
#		$token_string = $token_id->scalarVal();	
//        $token_string = $authentication->getToken();
		
#	$veicoli_req = new xmlrpcmsg('paline.PalinaLinee', array( new xmlrpcval($token_string, "string"), new xmlrpcval(72233, "int" ), new xmlrpcval("italiano", "string")));
#	$req_palina = new xmlrpc_client("http://muovi.roma.it/ws/xml/paline/7");
#	$result = $req_palina->send($veicoli_req);
/*
	$token_string = $_SESSION['token_id'];
	$paline = new Paline($token_string);
        $listVeicoli = $paline->getFermate("52452");		
	$v = 00001;
	echo "v: ".$v."<br>";
	foreach($listVeicoli as $veicolo)
	{
		echo "id veicolo: ".$veicolo->getIdPalina()."<br>";
	}
*/
//	echo "dim: ".count($listVeicoli);
/*
	$listPercorsi = $paline->getPercorsi("553");
	foreach($listPercorsi as $percorso)
	{	
		echo "percorso id: ".$percorso->getIdPercorso()."<br>";	
		$listFermate = $paline->getFermate($percorso->getIdPercorso());
		foreach($listFermate as $fermata)
		{		
		}
		
	}

	$listFermate = $paline->getFermate("22");
        echo "listPercorsi: ".count($listFermate)."<br>";
        foreach($listFermate as $fermata)
        {
                echo "nome: ".$fermata->getNome()."<br>";
        }

/*
	$atacCom = new ACBusWaitingTimes();
*/
/*
	$listPercorsi = $atacCom->getPathIDsForLineNumber_NEW(31);
	foreach($listPercorsi as $percorso)
	{
		echo "percorso: ".$percorso."<br>";
	}
	$listPercorsi2 = $atacCom->getPathIDsForLineNumber(31);
	foreach($listPercorsi2 as $percorso)
	{
		echo "percorso orig: ".$percorso."<br>";
	}
	$busPath = $atacCom->getPath_NEW(10274);
	$busPath2 = $atacCom->getPath(10274);
	

	if ($busPath->toXML(COMPACT_MODE) == $busPath2->toXML(COMPACT_MODE))
	{		
		echo "UGUALI<br>";
	}
*/
/*
	$stop = new BusStop(null, 74635);

	$xml1 = "";
	$busStop = $atacCom->getIncomingBusesAtStop($stop);
	foreach($busStop as $bus)
	{		
		$xml1 = $xml1.$bus->toXML(COMPACT_MODE);
	}



	$xml2 = "";
	$busStop2 = $atacCom->getIncomingBusesAtStop_NEW($stop);
	foreach($busStop2 as $bus2)
	{
		$xml2 = $xml2.$bus2->toXML(COMPACT_MODE);
		
	}
	echo "xml1: ".$xml1."<br>";
 	echo "xml2: ".$xml2."<br>";
	if ($xml1 == $xml2)
	{
		echo "UGUALI";
	}
*/
?>
</body>
</html>
